#include "ErrorCodeDefine.h"
#define SWITCH_BEGIN(EC) switch(EC) {
#define SWITCH_END }
#define SWITCH_CASE_DEFINE(EC, MESSAGE) case ECOperateResult::EC: os << #MESSAGE; break;

std::ostream& operator<<(std::ostream& os, const ECOperateResult EC)
{
    SWITCH_BEGIN (EC)
    SWITCH_CASE_DEFINE(Success,"成功")
    SWITCH_CASE_DEFINE(GraphNotPass,"图不联通")
    SWITCH_CASE_DEFINE(Unknown, "未知")
    SWITCH_END
    return os;
}

